package com.alibaba.seckill.service;

import com.alibaba.seckill.pojo.User;
import com.alibaba.seckill.vo.LoginVo;
import com.alibaba.seckill.vo.RespBean;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * 服务类
 * </p>
 * @author 曹帅
 * @since 2021-11-14
 */
public interface IUserService extends IService<User> {
    /**
     * 登录功能
     * @param loginVo
     * @param request
     * @param response
     * @return
     */
    RespBean login(HttpServletRequest request, HttpServletResponse response, LoginVo loginVo);

    /**
     * 根据cookie获取用户
     * @param userTicket
     * @param request
     * @param response
     * @return
     */
    User getByUserTicket(String userTicket, HttpServletRequest
            request, HttpServletResponse response);


    /**
     * 更新密码
     * @param userTicket
     * @param id
     * @param password
     * @return
     */
    RespBean updatePassword(String userTicket, Long id, String password);
}
